import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:mansui_kechaung/pages/customRule/customRule.dart';


import 'package:mansui_kechaung/pages/home/home.dart';
import 'package:mansui_kechaung/pages/notfound.dart';
class Routes {
  static late final FluroRouter router = FluroRouter();

  static String home = "/home";
  static String customRule = "/";

  static void configureRoutes() {
    router.notFoundHandler = Handler(
        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
          print("ROUTE WAS NOT FOUND !!!");
          return Scaffold(appBar: AppBar(toolbarHeight: 0), body: NotfoundPage());
    });
    Handler homeHandler = Handler(
        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
          return HomePage();
    });
    Handler customRuleHandler = Handler(
        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
          return CustomRulePage();
        });
    router.define(home, handler: homeHandler);
    router.define(customRule, handler: customRuleHandler);
  }
}